<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>		
		<link rel="stylesheet" type="text/css" href="/site_media/css/base.css" />
		<link rel="stylesheet" type="text/css" href="/site_media/css/form.css"/>
		
		<script type="text/javascript" src="/site_media/js/jquery-1.5.2.min.js"></script>
		<script type="text/javascript" src="/site_media/js/jquery-ui.min.js"></script>
		<link href="/site_media/css/jquery-ui.css" rel="stylesheet" type="text/css" media="all" />
		<script type="text/javascript" src="/site_media/js/ddlevelsmenu.js"></script>
		<script type="text/javascript" src="/site_media/js/util.js"></script>
		
		{% block js %}{% endblock %}
		<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title> UNCLE {% block title %}  {% endblock %}</title>
	</head>
	<body id="container" {% block onload %}{% endblock %}>

		{% if user.is_authenticated %}
<div style="position:absolute; top:10px; left:55px;">
			Welcome, {{ user.username }}
			{% if perms.users.is_artist %}
<a href="/user/requests/" title="{% load zdy_filter %}{{user.id|count_up_req}} upload requests">
				<button>{% load zdy_filter %} ({{user.id|count_up_req}})</button>
		  </a>
			{% else %}
			{% if perms.users.is_client %}
			<!--  a href="/user/basket/"><img src="/site_media/img/basket.png" height="29px"/> </a-->			
			{% endif %}
			{% endif %}

			<a href="/logout/" title="Log out!"><img src="/site_media/img/logout.gif" />  Log out</a>
</div>
		{% else %}
<div id="usr" style="position:absolute; top:10px; left:55px;">
			<a href="/accounts/login/"><img src="/site_media/img/people.gif"/>  Log in </a>
			<a href="/user/register/"><img src="/site_media/img/admin.gif"/>  Register </a>
</div>
		{% endif %}

	<div style="position:absolute; top:40px; left:50">
			<div id="ddtopmenubar" class="mattblackmenu" >
<ul>
					{% if perms.users.is_kth %}
					<li><a href="/user/search/cats/" rel="ddsearch">Search</a></li>
					<li><a href="/project/all" rel="project">Project</a></li>
					<li><a href="#" rel="other">Users</a></li>
                    <li><a href="#" rel="other2">System</a></li>

					{% else %}
                    {% if perms.users.is_producer %}
					<li><a href="/user/search/cats/" rel="ddsearch">Search</a></li>
					<li><a href="/project/all" rel="project">Project</a></li>
					<li><a href="#" rel="other">Users</a></li>
                    <li><a href="#" rel="other2">My profile</a></li>
                    
                    {% else %}
                    {% if perms.users.is_artist or perms.users.is_client %}
                    <li><a href="#" rel="other">My profile</a></li>
<li><a href="#" rel="other2">Asset</a></li>
					{% endif %}
                	{% endif %}
                    {% endif %}
                   					
			  </ul>
			</div>

		  <script type="text/javascript">
				ddlevelsmenu.setup("ddtopmenubar", "topbar")
			</script>
			<ul id="ddsearch" class="ddsubmenustyle">
				<li><a href="/user/search/abc/"><img src="/site_media/img/project.gif"> Alphabetical</a></li>
				<li><a href="/user/moods/"><img src="/site_media/img/tech.gif"> Categories & Skills</a></li>
				<li><a href="/user/search/"><img src="/site_media/img/status.gif"> Wild Search</a></li>
			</ul>
                
			<ul id="project" class="ddsubmenustyle">
            	<li><a href="/project/all" rel="project"><img src="/site_media/img/project.gif"> All Project</a></li>
				{% if perms.users.is_producer %}
   				<li><a href="/project/new/"><img src="/site_media/img/add.gif"> New project</a></li>
				{% endif %}
				<li><a href="/project/search/"><img src="/site_media/img/tech.gif"> Search project</a></li>
			</ul>
			
            <ul id="other" class="ddsubmenustyle">

       			{% if perms.users.is_kth %}
                <li><a href="/user/new/"><img src="/site_media/img/add.gif"> Add/delete user</a></li>
				<li><a href="/user/edit/all/"><img src="/site_media/img/approve.gif"> Edit User</a></li>
                <li><a href="/user/updates/"><img src="/site_media/img/update.gif"> Updates</a></li>
                <li><a href="/pwds/"><img src="/site_media/img/task.gif"> Paswords</a></li>
                
                {% else %}
                {% if perms.users.is_producer %}
                <li><a href="/user/new/"><img src="/site_media/img/add.gif"> New User</a></li>
                <li><a href="/user/edit/all/"><img src="/site_media/img/approve.gif"> Edit User</a></li>
				<li><a href="/user/updates/"><img src="/site_media/img/update.gif"> Updates</a></li>
                
                {% else %}
                {% if perms.users.is_artist %}
				<li><a href="/user/{{ user.id }}/"><img src="/site_media/img/status.gif"> View profile</a></li>
				<li><a href="/user/edit/all/"><img src="/site_media/img/approve.gif"> Edit profile</a></li>
                <li><a href onClick="MM_openBrWindow('/user/password/','Password','width=800,height=350')"><img src="/site_media/img/approve.gif"> Change password</a></li>
                
				{% endif %}
                {% endif %}
                {% endif %}	
                

   			</ul>
            
            <ul id="other2" class="ddsubmenustyle">
                {% if perms.users.is_kth %}
                <li><a href="/admin/"><img src="/site_media/img/admin.gif"> Django admin </a></li>
				<li><a href="/user/assets/"><img src="/site_media/img/film.gif"> Manage all assets</a></li>
				<li><a href="/user/category/"><img src="/site_media/img/tech.gif"> Manage categories</a></li>
				<li><a href="/user/emails/"><img src="/site_media/img/export.gif"> Send statistic e-mail</a></li>
                
                {% else %}
                {% if perms.users.is_producer %}
                <li><a href="/user/{{ user.id }}/"><img src="/site_media/img/status.gif"> View profile</a></li>
                <li><a href="/user/edit/all/"><img src="/site_media/img/approve.gif"> Edit profile</a></li>
                <li><a href="/user/upload/"><img src="/site_media/img/export.gif"> Upload video</a></li>
                <li><a href="/user/assets/"><img src="/site_media/img/film.gif"> My assets</a></li>
                <li><a href onClick="MM_openBrWindow('/user/password/','Password','width=800,height=350')"><img src="/site_media/img/approve.gif"> Change password</a></li>
                
                {% else %}
                {% if perms.users.is_artist %}
                <li><a href="/user/upload/"><img src="/site_media/img/export.gif"> Upload assets</a></li>
                <li><a href="/user/requests/"><img src="/site_media/img/comment.gif"> Upload requests</a></li>
				<li><a href="/user/assets/"><img src="/site_media/img/film.gif"> My assets</a></li>
                {% endif %}
                {% endif %}
                {% endif %}
          </ul>
            
		</div>

<div style="position:absolute; top:15px; left:580px;">
			<a href="http://www.uncle-berlin.de/index.html" title="www.uncle-berlin.de">
			<img src="/site_media/img/unclelogo.png"/>
			</a>
</div>

		<div style="position:absolute; top:83px; left:50px; background-color: #F2CE7D; border-width:thin; layer-background-color: #F2CE7D; border: 1px #FFF; height: 15; clip: rect(auto,auto,auto,-2);">
				{% if messages %}
				{% for message in messages %}
				<span style="color:#000;">&nbsp;Information: {{ message }}&nbsp;</span>
				{% endfor %}
				{% endif %}
		</div>

		<div id="content" style="position:absolute;top:60px;left:20px;">
			{% block content %}{% endblock %}
		</div>
	</body>
</html>